ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Dynamic submenu

January 12, 2008 10:55am

Subscribe [3]
  • #1 / Jan 12, 2008 10:55am

    Combicart

    1 posts

    On my website I use embedded templates to display my navigationbars. I have a template for my main navigationbar and a template for my sub navigationbar. Through css I give the menus a ‘active’ state. I use the following code:

    Code on mainpage

    {embed="embeds/mainnav" my_location="home"}

    Code in template

    <a href="#class=dlnavcurrentclass=dlnavlink">Home</a>

    It’s easy to add a active state to the mainmenu by using the ‘my_location’ variable. Now I would like to create subpages for this page. Therefore I’ve setup a weblog called ‘home’. My purpose is to post a entry which can be used as a subpage. You can reach this page throug http://www.example.com/home/name_of_entry.

    Is it possible to add a dynamic value for the ‘my_location’ variable to get my submenu working the same way as the mainmenu. So is it possible to add ‘name_of_entry’ dynamically to the ‘my_location’ variable?

  • #2 / May 06, 2008 5:54am

    Henrik Eklund

    34 posts

    Maybe this could help you:

    http://ellislab.com/forums/viewthread/72281/#357320

    /Henrik

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases